﻿<Page x:Class="WpfEffect3._5.PageBitmapEffectInput"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="800" Background="Black"
	Title="PageBitmapEffectInput">
    <Grid>

        <Image Source="images/1.png"  Width="200" Height="200" Margin="84,12,516,88">
            <Image.BitmapEffectInput>
                <BitmapEffectInput AreaToApplyEffectUnits="RelativeToBoundingBox" AreaToApplyEffect=".20,.20,.5,.3"  />
            </Image.BitmapEffectInput>
            <Image.BitmapEffect>
                <BevelBitmapEffect x:Name="effect"  BevelWidth="20" Relief="0.4916943521594685" LightAngle="270.89700996677738" 
                                   Smoothness="0.601328903654485" EdgeProfile="CurvedOut" />
            </Image.BitmapEffect>
        </Image>
        <Image Height="200" Margin="372,12,228,88" Source="images/1.png" Width="200">
            <Image.BitmapEffect>
                <EmbossBitmapEffect    LightAngle="270" Relief="0.49"  />
            </Image.BitmapEffect>
            <Image.BitmapEffectInput>
                <BitmapEffectInput AreaToApplyEffect="50,50,100,60" AreaToApplyEffectUnits="Absolute" />
            </Image.BitmapEffectInput>
        </Image>
        <TextBlock Height="61" Margin="84,218,100,0" Name="textBlock1" Foreground="White"  TextWrapping="Wrap" xml:space="preserve"
                   Text="在指定区域运用BitmapEffect效果，AreaToApplyEffectUnits: Absolute绝对定位 RelativeToBoundingBox相对定位
AreaToApplyEffect:矩形区域 ，依据相对位置和绝对位置来确定" 
                   VerticalAlignment="Top" />
    </Grid>
</Page>
